package com.example.demo.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
//@Component
@Slf4j
@Order(2)
public class TestAspect2 {

    @Before("execution(* com.example.demo.controller.*.*(..))")
    public void before()  {
        log.info("TestAspect2 before: 方法之前");
    }


    @After("execution(* com.example.demo.controller.*.*(..))")
    public void after()  {
        log.info("TestAspect2 after: 方法执行之后");
    }

}
